package com.guochenglang.www.dao;

import com.guochenglang.www.pojo.InviteMessage;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author GuoChenglang
 */
public interface InviteMessageDao {
    /**
     * 获得邀请列表
     *
     * @param conditions 搜素条件
     * @return 邀请列表
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    ArrayList<InviteMessage> inviteMessageSelect(InviteMessage conditions) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 添加邀请
     *
     * @param comfort 添加信息
     * @return 添加的主键
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int insertInviteMessage(InviteMessage comfort) throws SQLException, InterruptedException, IllegalAccessException;

    /**
     * 删除邀请
     *
     * @param conditions 删除条件
     * @return 删除行数
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     */
    int deleteInviteMessage(InviteMessage conditions) throws SQLException, InterruptedException, IllegalAccessException;
}
